package com.zbxx.practice.designpattern.proxy.staticproxy;

import com.zbxx.practice.designpattern.proxy.BusinessObject;
import com.zbxx.practice.designpattern.proxy.BusinessService;

/**
 * 静态代理
 * @author 万仁杰
 * @date 2019/05/31
 */
public class Main {


    public static void main(String[] args) {
        //继承
        BusinessService businessService = new BusinessExtendsObject();
        businessService.doService();
        //聚合
        BusinessService businessService1 = BusinessProxyObject.createStaticProxyInstance(new BusinessObject());
        businessService.doService();
    }

}
